#define _CRT_SECURE_NO_WARNINGS

#include<stdio.h>

int main()
{
	int a = 1;
	int b = 1;
	int c = 1;
	int n = 0;
	scanf("%d", &n);
	for (n; n >= 3; n--)
	{
		c = a + b;
		a = b;
		b = c;
	}
	printf("%d", c);

	return 0;
}